home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / Developer Essentials May91 / MPW Interfaces & Libraries 3.2 / AIncludes / Balloons.a < prev    next >
Encoding:
Text File  |  1991-04-17  |  8.8 KB  |  270 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Balloons.a
  3. ;
  4. ;    Contains:    Assembly Equates for calling Balloon Help
  5. ;
  6. ;    Copyright:    © 1989-1990 by Apple Computer, Inc., all rights reserved.
  7. ;
  8. ;
  9.     IF &TYPE('__IncludingBalloons__') = 'UNDEFINED' THEN
  10. __IncludingBalloons__    SET    1
  11.  
  12.                         TITLE        'Balloons.a - Help Manager'
  13. ;
  14. ;___________________________________________________________________________________________________________
  15. ;
  16. hmBalloonHelpVersion    EQU     2            ;  The real version of the Help Manager 
  17. ;
  18. ;    Help Mgr Error Codes in range: -850 to -874
  19. ;
  20. hmHelpDisabled            EQU        -850        ; Show Balloons mode was off, call to routine ignored
  21. hmBalloonAborted        EQU        -853        ; Returned if mouse was moving or mouse wasn't in window port rect
  22. hmSameAsLastBalloon        EQU        -854        ; Returned from HMShowMenuBalloon if menu & item is same as last time
  23. hmHelpManagerNotInited    EQU        -855        ; Returned from HMGetHelpMenuHandle if help menu not setup 
  24. hmSkippedBalloon        EQU        -857        ; Returned from calls if helpmsg specified a skip balloon 
  25. hmWrongVersion            EQU        -858        ; Returned if help mgr resource was the wrong version 
  26. hmUnknownHelpType        EQU        -859        ; Returned if help msg record contained a bad type 
  27. hmOperationUnsupported    EQU        -861        ; Returned from HMShowBalloon call if bad method passed to routine 
  28. hmNoBalloonUp            EQU        -862        ; Returned from HMRemoveBalloon if no balloon was visible when call was made 
  29. hmCloseViewActive        EQU        -863        ; Returned from HMRemoveBalloon if CloseView was active
  30. ;
  31. kHMHelpMenuID            EQU        -16490        ; Resource ID and menu ID of help menu
  32. kHMAboutHelpItem        EQU        1            ; help menu item number of About Balloon Help…
  33. kHMShowBalloonsItem        EQU        3            ; help menu item number of Show/Hide Balloons
  34. ;
  35. kHMBalloonHelpID        EQU        -5696        ; ID of various Help Mgr package resources (in Pack14 range) 
  36. kHMBalloonWDEFID        EQU        126            ; Resource ID of the WDEF proc used in standard balloons 
  37. ;
  38. helpItem                EQU        1            ; key value in DITL template that corresponds to the help item
  39. ;
  40. ;    Options for Help Manager resources in 'hmnu', 'hdlg', 'hrct', 'hovr', & 'hfdr' resources
  41. ;
  42. hmDefaultOptions        EQU        0            ; default options for help manager resources
  43. hmUseSubID                EQU        1            ; treat resID's in resources as subID's of driver base ID (for Desk Accessories)
  44. hmAbsoluteCoords        EQU        2            ; ignore window port origin and treat rectangles as absolute coords (local to window) 
  45. hmSaveBitsNoWindow        EQU        4            ; don't create a window, just blast bits on screen. No update event is generated
  46. hmSaveBitsWindow        EQU        8            ; create a window, but restore bits behind window when window goes away & generate update event
  47. hmMatchInTitle            EQU        16            ; for hwin resources, match string anywhere in window title string
  48. ;
  49. ;    Constants for Help Types in 'hmnu', 'hdlg', 'hrct', 'hovr', & 'hfdr' resources
  50. ;
  51. kHMStringItem            EQU        1            ; pstring used in resource
  52. kHMPictItem                EQU        2            ; 'PICT' ResID used in resource
  53. kHMStringResItem        EQU        3            ; 'STR#' ResID & index used in resource
  54. kHMTEResItem            EQU        6            ; Styled Text Edit ResID used in resource ('TEXT' & 'styl')
  55. kHMSTRResItem            EQU        7            ; 'STR ' ResID used in resource
  56. kHMSkipItem                EQU        256            ; don't display a balloon
  57. kHMCompareItem            EQU        512            ; Compare pstring in menu item w/ PString in resource item ('hmnu' only)
  58. kHMNamedResourceItem    EQU        1024        ; Use pstring in menu item to get 'STR#', 'PICT', or 'STR ' resource ('hmnu' only)
  59. kHMTrackCntlItem         EQU        2048        ; Reserved
  60. ;
  61. ;    Constants for hmmHelpType's when filling out HMMessageRecord
  62. ;
  63. khmmString                EQU        1            ; help message contains a PString
  64. khmmPict                EQU        2            ; help message contains a resource ID to a 'PICT' resource
  65. khmmStringRes            EQU        3            ; help message contains a res ID & index to a 'STR#' resource
  66. khmmTEHandle            EQU        4            ; help message contains a Text Edit handle
  67. khmmPictHandle            EQU        5            ; help message contains a Picture handle
  68. khmmTERes                EQU        6            ; help message contains a res ID to 'TEXT' & 'styl' resources
  69. khmmSTRRes                EQU        7            ; help message contains a res ID to a 'STR ' resource
  70. ;
  71. ;    ResTypes for Styled TE Handles when extracting from Resources
  72. ;
  73. kHMTETextResType        EQU        'TEXT'        ; Resource Type of text data for styled TE record w/o style info
  74. kHMTEStyleResType        EQU        'styl'        ; Resource Type of style information for styled TE record
  75.  
  76. ;    Generic defines for the state parameter used when extracting 'hmnu' & 'hdlg' messages
  77. ;
  78. kHMEnabledItem            EQU        0            ; item is enabled, but not checked or control value EQU 0
  79. kHMDisabledItem            EQU        1            ; item is disabled, grayed in menus or disabled in dialogs
  80. kHMCheckedItem            EQU        2            ; item is enabled, and checked or control value EQU 1
  81. kHMOtherItem            EQU        3            ; item is enabled, and control value > 1
  82. ;
  83. ;    Resource Types for whichType parameter used when extracting 'hmnu' & 'hdlg' messages
  84. ;
  85. kHMMenuResType            EQU        'hmnu'        ; ResType of help resource for supporting menus
  86. kHMDialogResType        EQU        'hdlg'        ; ResType of help resource for supporting dialogs
  87. kHMWindListResType        EQU        'hwin'        ; ResType of help resource for supporting windows
  88. kHMRectListResType        EQU        'hrct'        ; ResType of help resource for rectangles in windows
  89. kHMOverrideResType        EQU        'hovr'        ; ResType of help resource for overriding system balloons
  90. kHMFinderApplResType    EQU        'hfdr'        ; ResType of help resource for custom balloon in Finder
  91. ;
  92. ;    Method parameters to pass to HMShowBalloon    
  93. ;
  94. kHMRegularWindow        EQU        0            ; Create a regular window floating above all windows    
  95. kHMSaveBitsNoWindow        EQU        1            ; Just save the bits and draw (for MDEF calls
  96. kHMSaveBitsWindow        EQU        2            ; Regular window, save bits behind, AND generate update event
  97. ;
  98. ;    help message structure (offsets into help message record)
  99. ;
  100. hmmHelpType                EQU     0
  101. hmmHelpMessage            EQU        2
  102. hmmHMSize                EQU        4 + 256        ; HMMessageRecord worse case size
  103. ;
  104. ;    help message size
  105. ;
  106. khmmMsgSize                EQU        256 + 2        ; max pstring + type integer
  107. ;
  108. ;
  109. ;___________________________________________________________________________________________________________
  110. ;
  111. ;    Package selectors for Help Manager Package
  112. ;
  113. kHMGetHelpMenuHandle    EQU        $0200            ; 0 words of parameters
  114. kHMShowBalloon            EQU        $0B01            ; 11 words of parameters
  115. kHMRemoveBalloon        EQU        $0002            ; 0 words of parameters
  116. kHMGetBalloons            EQU        $0003            ; 0 words of params    (Note: doesn't load package!)
  117. kHMSetBalloons            EQU        $0104            ; 1 word of parameters
  118. kHMShowMenuBalloon        EQU        $0E05            ; 14 words of parameters
  119. kHMGetIndHelpMsg        EQU        $1306            ; 19 words of parameters    <12>
  120. kHMIsBalloon            EQU        $0007            ; 0 words of parameters
  121. kHMSetFont                EQU        $0108            ; 1 word of parameters
  122. kHMSetFontSize            EQU        $0109            ; 1 word of parameters
  123. kHMGetFont                EQU        $020A            ; 2 words of parameters
  124. kHMGetFontSize            EQU        $020B            ; 2 words of parameters
  125. kHMSetDialogResID        EQU        $010C            ; 1 words of parameters
  126. kHMSetMenuResID            EQU        $020D            ; 2 words of parameters
  127. kHMBalloonRect            EQU        $040E            ; 4 words of parameters
  128. kHMBalloonPict            EQU        $040F            ; 4 words of parameters
  129. kHMScanTemplateItems    EQU        $0410            ; 4 words of parameters
  130. kHMExtractHelpMsg        EQU        $0711            ; 7 words of parameters
  131. kHMFillCitationString    EQU        $0512            ; 5 words of parameters
  132. kHMGetDialogResID        EQU        $0213            ; 2 words of parameters
  133. kHMGetMenuResID            EQU        $0314            ; 3 words of parameters
  134. ;
  135. ;___________________________________________________________________________________________________________
  136. ;
  137. ;    Help Manager interface macros
  138. ;
  139.         macro
  140.             _HMGetHelpMenuHandle
  141.             MOVE.W    #kHMGetHelpMenuHandle,D0
  142.             _Pack14    
  143.         endm
  144.         
  145.         macro
  146.             _HMShowBalloon
  147.             MOVE.W    #kHMShowBalloon,D0
  148.             _Pack14    
  149.         endm
  150.  
  151.         macro
  152.             _HMRemoveBalloon
  153.             MOVE.W    #kHMRemoveBalloon,D0
  154.             _Pack14    
  155.         endm
  156.         
  157.         macro
  158.             _HMGetBalloons
  159.             MOVE.W    #kHMGetBalloons,D0
  160.             _Pack14    
  161.         endm
  162.  
  163.         macro
  164.             _HMSetBalloons
  165.             MOVE.W    #kHMSetBalloons,D0
  166.             _Pack14    
  167.         endm
  168.         
  169.         macro
  170.             _HMShowMenuBalloon
  171.             MOVE.W    #kHMShowMenuBalloon,D0
  172.             _Pack14    
  173.         endm
  174.  
  175.         macro
  176.             _HMSystemMenu
  177.             MOVE.W    #kHMSystemMenu,D0
  178.             _Pack14    
  179.         endm
  180.         
  181.         macro
  182.             _HMGetIndHelpMsg
  183.             MOVE.W    #kHMGetIndHelpMsg,D0
  184.             _Pack14    
  185.         endm    
  186.         
  187.         macro
  188.             _HMIsBalloon
  189.             MOVE.W    #kHMIsBalloon,D0
  190.             _Pack14    
  191.         endm
  192.  
  193.         macro
  194.             _HMSetFont
  195.             MOVE.W    #kHMSetFont,D0
  196.             _Pack14    
  197.         endm
  198.         
  199.         macro
  200.             _HMGetFont
  201.             MOVE.W    #kHMGetFont,D0
  202.             _Pack14    
  203.         endm
  204.         macro
  205.             _HMGetFontSize
  206.             MOVE.W    #kHMGetFontSize,D0
  207.             _Pack14    
  208.         endm
  209.         
  210.         macro
  211.             _HMSetDialogResID
  212.             MOVE.W    #kHMSetDialogResID,D0
  213.             _Pack14    
  214.         endm
  215.  
  216.         macro
  217.             _HMSetMenuResID
  218.             MOVE.W    #kHMSetMenuResID,D0
  219.             _Pack14    
  220.         endm
  221.         
  222.         macro
  223.             _HMBalloonRect
  224.             MOVE.W    #kHMBalloonRect,D0
  225.             _Pack14    
  226.         endm
  227.         
  228.         macro
  229.             _HMBalloonPict
  230.             MOVE.W    #kHMBalloonPict,D0
  231.             _Pack14    
  232.         endm
  233.         
  234.         macro
  235.             _HMScanTemplateItems
  236.             MOVE.W    #kHMScanTemplateItems,D0
  237.             _Pack14    
  238.         endm
  239.         
  240.         macro
  241.             _HMExtractHelpMsg
  242.             MOVE.W    #kHMExtractHelpMsg,D0
  243.             _Pack14    
  244.         endm
  245.         
  246.         macro
  247.             _HMFillCitationString
  248.             MOVE.W    #kHMFillCitationString,D0
  249.             _Pack14    
  250.         endm
  251.         
  252.         macro
  253.             _HMGetDialogResID
  254.             MOVE.W    #kHMGetDialogResID,D0
  255.             _Pack14    
  256.         endm
  257.  
  258.         macro
  259.             _HMGetMenuResID
  260.             MOVE.W    #kHMGetMenuResID,D0
  261.             _Pack14    
  262.         endm
  263.         
  264.         macro
  265.             _HMGetBalloonWindow
  266.             MOVE.W    #kHMGetBalloonWindow,D0
  267.             _Pack14    
  268.         endm
  269.  
  270.     ENDIF    ; ...already included